<?php
/**
 * 海外仓-谷仓(入库订单明细)（依据海外仓入库订单，同步入库erp代发库存）
 */

namespace App\Console\Commands\Rakuten\GuCang;


use App\Logic\Plat\Rakuten\Overseas\GuCang\InboundOrder\OverseasInboundOrder;
use Illuminate\Console\Command;

class SyncInboundOrder extends Command
{

    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'gucang:get-grn-detail {orderId=0}';

    /**
     * The console command description.
     * @var string
     */
    protected $description = 'exe func';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     */
    public function handle()
    {
        $receivingIds = [];
        $orderId = $this->argument('orderId'); //谷仓入库单号,示例：RVG12231-240603-0001
        if ($orderId) {
            $receivingIds = $orderId;
        }

        OverseasInboundOrder::getGrnDetail($receivingIds);
        $this->info('finish!');
    }

}
